<?php
    require_once dirname(dirname(__FILE__)) . '/shared/config/config.php';
    require_once DOCUMENT_ROOT . DIR_ADMIN_INCLUDE . 'check_admin_login.php';
    require_once DOCUMENT_ROOT . DIR_INCLUDE . 'html_generator.php';
    require_once DOCUMENT_ROOT . DIR_SHARED_API . 'api_industry.php';
    require_once DOCUMENT_ROOT . DIR_SHARED_LIBRARIES . 'lib_redirect.php';
    $title = 'Admin Panel';
    $success = NULL;
    $error = NULL;

    $email_activation = api_general::get_option("email_activation");
    $active_text = "value='on' checked";
    if ($email_activation === 'off') {
        $active_text = "value='off'";
    }

?>

<!DOCTYPE html>
<!--[if lt IE 7]>
<html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>
<html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>
<html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<!--<![endif]-->

<html>
<head>
    <?php require_once DOCUMENT_ROOT . DIR_ADMIN_INCLUDE . 'head.php' ?>
    <script type="text/javascript">
        $(document).ready(function() {
            var emailActivation = new EmailActivation(
                    $('input[name="ckb_email_activation"]'),
                    "<?php echo LINK_ROOT . DIR_AJAX; ?>switch_email_activation.php");
            emailActivation.monitor();
        });
    </script>
</head>
<body>
<?php require_once DOCUMENT_ROOT . DIR_ADMIN_INCLUDE . 'header.php' ?>

<!-- Title -->
<div class="section section-black">
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <div class="calltoaction-wrapper">
                    <h3>Email Activation</h3>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- End Title -->


<div class="ts-wrapper">
    <!-- Section Form -->
    <div class="section">
        <div class="container">
            <div class="row">
                <div class="col-md-offset-2 col-md-8">
                    <div class="service-wrapper">
                        <div class="text-center ts-title ts-margin-bottom">Email Activation</div>
                        <?php show_message($success, $error, 1, 10); ?>
                        
                        
                                <h4>Switch OFF/ON the activation of user register</h4>

                                <label class="ts-full-left switch-light switch-android" onclick="">
                                    <input type="checkbox" name="ckb_email_activation" <?php echo $active_text; ?>>
                                        <span>
                                                <span>Off</span>
                                                <span>On</span>
                                        </span>

                                        <a></a>
                                </label>


                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- End Section Form -->
</div>

<?php require_once DOCUMENT_ROOT . DIR_ADMIN_INCLUDE . 'footer.php' ?>
</body>
</html>